<template>
    <div>
<h2>新增</h2>
<table>
    <tbody>
        <tr>
            <td>名称</td>
            <td>
                <input type="text" v-model="data.name">
                <br>
            </td>
        </tr>
        <tr>
            <td colspan="2">
               <input type="button" value="保存" @click="Add">
               <a href="/">新增</a>
            </td>
        </tr>
    </tbody>
</table>
    </div>
</template>

<script setup lang="ts">
import { ref } from 'vue';
import axios from 'axios';

const data = ref({
  "id": 0,
  "name": ""
});

const Add=()=>{ 
    axios.get("").then(res=>{})
    axios.post("").then(res=>{})
    axios.delete("").then(res=>{})



    axios.post("https://localhost:7205/api/Member/AddMeber",data.value).then(res=>{
        if(res.data>0){
            alert("新增成功")
        }
        else{
            alert("新增失败了。。。。。")
        }
    })
    
}

</script>

<style scoped>

</style>